<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
	    <meta name="apple-mobile-web-app-capable" content="yes" />
	    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
	    <meta name="format-detection" content="telephone=no" />
	    <meta http-equiv="Cache-Control" content="must-revalidate,no-cache">
	    <meta http-equiv="x-dns-prefetch-control" content="on" />
	    <meta name="version" content="20170614">
		<title>发表评价</title>
		<link rel="stylesheet" type="text/css" href="css/reset.css"/>
		<script src="js/initRem.js"></script>
		<link rel="stylesheet" href="css/bootstrap.min.css">  
		<script src="js/jquery-2.1.4.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<link rel="stylesheet" type="text/css" href="css/mui.min.css"/>
		<script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="css/style.css"/>
	</head>

	<body class="w-doc-eval">
		<div class="evalAll">
			<div class="tips">
				本次资讯已结束,请评价
			</div>
			<div class="docStar">
				<span>医生评价</span>
				<span class="evaStar">
					<i class="icon glyphicon glyphicon-star-empty"></i>
					<i class="icon glyphicon glyphicon-star-empty"></i>
					<i class="icon glyphicon glyphicon-star-empty"></i>
					<i class="icon glyphicon glyphicon-star-empty"></i>
					<i class="icon glyphicon glyphicon-star-empty"></i>
				</span>
			</div>
			<textarea name="eval" rows="" cols="" id="docEvaluate" placeholder="说说服务体验中的感受吧" maxlength="140"></textarea>
			<span class="words">
				还能输入<span>140</span>个字
			</span>
			<button class="evalBtn">提交</button>
		</div>
		
		
	</body>
	<script type="text/javascript">
		var stars = 0;
		document.getElementById("docEvaluate").oninput = function(){
			var word = 140;
			word = 140 - $("#docEvaluate").val().length;
			$(".evalAll .words span").text(word);
		}
		$(".evaStar i").each(function(index,item){
			$(this).click(function(){
				stars = index + 1 ;
				for(var i = 0 ; i < 5 ; i ++){
					$(".evaStar i").eq(i).removeClass("glyphicon-star");
					$(".evaStar i").eq(i).addClass("glyphicon-star-empty");
				};
				for(var i = 0 ; i < index + 1 ; i ++){
					$(".evaStar i").eq(i).removeClass("glyphicon-star-empty");
					$(".evaStar i").eq(i).addClass("glyphicon-star");
				}
			})
		});
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		$(".evalBtn").click(function(){
			if(stars == 0){
				mui.alert('亲,还没有评价哦!', '亿家健康');
			}
		})
	</script>
</html>